pkgname=sonnet
pkgver=5.37.0
pkgrel=1
pkgdesc='Spelling framework for Qt5'
arch="all"
url='https://community.kde.org/Frameworks'
license="LGPL"
depends="qt5-qtbase"
makedepends="extra-cmake-modules qt5-qttools-dev doxygen"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

prepare() {
	mkdir -p $srcdir/build
}

build() {
	cd $srcdir/build
	cmake "$srcdir"/${pkgname}-${pkgver} \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DKDE_INSTALL_LIBDIR=lib \
		-DBUILD_TESTING=OFF \
		-DBUILD_QCH=ON
	make
}

package() {
	cd $srcdir/build
	make DESTDIR="${pkgdir}" install
}
sha512sums="bd22671f2c9edff553df80db050393dfb88b14dd6bc869957bfbe70dd30c9ee17e90ac9d88d45e700ffc014708b7703ef8cfacbff6bcdc51ecffa7e45e83aa3d  sonnet-5.37.0.tar.xz"
